package com.projet.api;

import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;

import java.nio.file.Files;
import java.nio.file.Paths;

public class TransferMain {
    public static void main(String[] args) {

        try {
            String json = new String(Files.readAllBytes(Paths.get("C:\\Users\\Administrator\\Desktop\\附件\\json.txt")));
            System.out.println(json);
            json = json.replaceAll("\r","");
            json = json.replaceAll("\n","");
            ErpParam param = SignUtil.buildPara(json, "insertShip");
            String content = JSONUtil.toJsonStr(param);
            String url = "http://192.168.30.124:13043/transfer/bill/anhui/erp/do";
            System.out.println(HttpUtil.post(url, content));
        } catch (Exception ex) {
            ex.printStackTrace();
        }


    }
}
